using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Raster._RasterProperties
{
    /// <summary>
    /// <para>Convert Raster Function Template</para>
    /// <para>Converts a raster function template between formats (rft.xml, json, and binary).</para>
    /// <para>在格式（rft.xml、json 和二进制）之间转换栅格函数模板。</para>
    /// </summary>    
    [DisplayName("Convert Raster Function Template")]
    public class ConvertRasterFunctionTemplate : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ConvertRasterFunctionTemplate()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster_function_template">
        /// <para>Input Raster Function Template</para>
        /// <para>The input raster function template file. The input template file can be XML, JSON, or binary format.</para>
        /// <para>输入栅格函数模板文件。输入模板文件可以是 XML、JSON 或二进制格式。</para>
        /// </param>
        /// <param name="_out_raster_function_template_file">
        /// <para>Output Raster Function Template File</para>
        /// <para>The output raster function template file path and file name.</para>
        /// <para>输出栅格函数模板文件路径和文件名。</para>
        /// </param>
        public ConvertRasterFunctionTemplate(object _in_raster_function_template, object _out_raster_function_template_file)
        {
            this._in_raster_function_template = _in_raster_function_template;
            this._out_raster_function_template_file = _out_raster_function_template_file;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Convert Raster Function Template";

        public override string CallName => "management.ConvertRasterFunctionTemplate";

        public override List<string> AcceptEnvironments => ["scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_raster_function_template, _out_raster_function_template_file, _format.GetGPValue()];

        /// <summary>
        /// <para>Input Raster Function Template</para>
        /// <para>The input raster function template file. The input template file can be XML, JSON, or binary format.</para>
        /// <para>输入栅格函数模板文件。输入模板文件可以是 XML、JSON 或二进制格式。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Raster Function Template")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster_function_template { get; set; }


        /// <summary>
        /// <para>Output Raster Function Template File</para>
        /// <para>The output raster function template file path and file name.</para>
        /// <para>输出栅格函数模板文件路径和文件名。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Raster Function Template File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster_function_template_file { get; set; }


        /// <summary>
        /// <para>Format</para>
        /// <para><xdoc>
        ///   <para>The output function template file format.</para>
        ///   <bulletList>
        ///     <bullet_item>XML—XML output format.</bullet_item><para/>
        ///     <bullet_item>JSON—JSON output format. This is the default.</bullet_item><para/>
        ///     <bullet_item>Binary—Binary output format.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出函数模板文件格式。</para>
        ///   <bulletList>
        ///     <bullet_item>XML - XML 输出格式。</bullet_item><para/>
        ///     <bullet_item>JSON - JSON 输出格式。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>二进制 - 二进制输出格式。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Format")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _format_value _format { get; set; } = _format_value._JSON;

        public enum _format_value
        {
            /// <summary>
            /// <para>XML</para>
            /// <para>XML—XML output format.</para>
            /// <para>XML - XML 输出格式。</para>
            /// </summary>
            [Description("XML")]
            [GPEnumValue("XML")]
            _XML,

            /// <summary>
            /// <para>JSON</para>
            /// <para>JSON—JSON output format. This is the default.</para>
            /// <para>JSON - JSON 输出格式。这是默认设置。</para>
            /// </summary>
            [Description("JSON")]
            [GPEnumValue("JSON")]
            _JSON,

            /// <summary>
            /// <para>Binary</para>
            /// <para>Binary—Binary output format.</para>
            /// <para>二进制 - 二进制输出格式。</para>
            /// </summary>
            [Description("Binary")]
            [GPEnumValue("BINARY")]
            _BINARY,

        }

        public ConvertRasterFunctionTemplate SetEnv(object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}